<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well" data-original-title>
			<h2>
				<i class="icon-edit"></i>Chỉnh sửa danh mục
			</h2>

		</div>
		<div class="box-content">
			<?php foreach ($catedetails as $detail):?>
			<?php echo form_open_multipart('category/edit_category/'.$detail->iID); ?>
			<fieldset>

				<div class="control-group">
					<label class="control-label" for="typeahead">Tên danh mục</label>
					<div class="controls">
						<input type="text" class="span6 typeahead" id="typeahead"
							name="catename" value="<?php echo $detail->sCateName?>" />
						<p class="help-block"></p>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="typeahead">Danh mục cha</label>
					<div class="controls">
						<select name="cateroot" id="cateroot">
							<option value="0">----------------</option>
							<?php foreach($listcate as $cate):?>
							<option <?php if($cate->iID == $detail->iCateRoot):?>
								selected="selected" <?php endif;?>
								value="<?php echo $cate->iID?>">
								<?php echo $cate->sCateName;?>
							</option>
							<?php endforeach;?>
						</select>
						<p class="help-block"></p>
					</div>
				</div>

				<div class="form-actions">
					<button type="submit" name="submit" class="btn btn-primary">Lưu</button>

				</div>
			</fieldset>
			<?php echo form_close(); ?>
			<?php endforeach;?>

		</div>
	</div>

</div>
